Skip to content

test: add shared jest tests for demo apps#313

Open
alpharius-ck wants to merge 5 commits intomainfrom
feat/add-shared-unit-tests-for-rn-demo-apps
Open

test: add shared jest tests for demo apps#313
alpharius-ck wants to merge 5 commits intomainfrom
feat/add-shared-unit-tests-for-rn-demo-apps

Conversation

@alpharius-ck
Copy link
Copy Markdown
Collaborator

@alpharius-ck alpharius-ck commented May 6, 2026

Summary

#11

  • Adding Jest unit tests for demo apps
  • All tests are shared and could be run for each of the product separately

Test plan

Screenshot 2026-05-06 at 17 18 47 Screenshot 2026-05-06 at 17 19 55 Screenshot 2026-05-06 at 17 24 49

@alpharius-ck alpharius-ck requested a review from artus9033 May 7, 2026 09:30
@artus9033 artus9033 changed the title feat: add shared jest tests for demo apps test: add shared jest tests for demo apps May 7, 2026
@hurali97 hurali97 requested a review from Copilot May 8, 2026 07:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a shared Jest-based test suite that can be executed across the demo apps in apps/, and wires up each app’s Jest configuration to run those shared suites. It also updates Turbo/task wiring and docs to support running app tests from the repo root.

Changes:

  • Added a new apps/brownfield-example-shared-tests workspace exporting reusable Jest suites + shared Jest setup/mocks.
  • Added Jest configs/setup and new shared-suite test entrypoints for RNApp, ExpoApp54, and ExpoApp55 (plus test:apps turbo script and CONTRIBUTING docs).
  • Adjusted Turbo dependencies (build:brownfield) and package scripts to ensure needed builds happen before lint/typecheck.

Reviewed changes

Copilot reviewed 30 out of 32 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
yarn.lock Adds Jest + testing-library deps required by the example apps/shared test workspace.
turbo.json Makes lint/typecheck depend on build:brownfield (including upstream deps).
packages/cli/turbo.json Defines a build:brownfield turbo task for the CLI dist output.
packages/cli/package.json Adds build:brownfield script and tweaks build behavior.
packages/brownie/package.json Adds build:brownfield script alias.
package.json Adds test:apps root script to run tests for apps/* via Turbo.
CONTRIBUTING.md Documents the new app testing commands and shared-test setup.
apps/RNApp/package.json Points test to the app’s Jest config and adds shared test deps.
apps/RNApp/jest.setup.js Loads shared Jest setup from the shared-tests workspace.
apps/RNApp/jest.config.js Adds Jest config for monorepo source mapping + shared-tests transforms.
apps/RNApp/tests/brownfield.example.test.tsx Runs the shared suites against RNApp components.
apps/RNApp/tests/App.test.tsx Updates App import path to src/App.
apps/ExpoApp55/package.json Adds Jest/test deps and a test script; disables expo lint cache.
apps/ExpoApp55/jest/cssMock.js Stubs CSS imports for Jest.
apps/ExpoApp55/jest.setup.js Loads shared Jest setup from the shared-tests workspace.
apps/ExpoApp55/jest.config.js Adds Jest config for Expo 55, monorepo source mapping, and aliasing.
apps/ExpoApp55/eslint.config.js Adds Node globals for jest.config.js linting.
apps/ExpoApp55/tests/brownfield.example.test.tsx Runs the shared suites against ExpoApp55 components.
apps/ExpoApp54/package.json Adds Jest/test deps and a test script; disables expo lint cache.
apps/ExpoApp54/jest.setup.js Loads shared Jest setup from the shared-tests workspace.
apps/ExpoApp54/jest.config.js Adds Jest config for Expo 54, monorepo source mapping, and aliasing.
apps/ExpoApp54/tests/brownfield.example.test.tsx Runs the shared suites against ExpoApp54 components.
apps/brownfield-example-shared-tests/** New workspace containing shared Jest suites, types, and setup/mocks.
.changeset/orange-dancers-fry.md Declares version bumps associated with adding Jest unit tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread apps/ExpoApp55/jest.config.js Outdated
Comment thread apps/ExpoApp55/package.json
alpharius-ck and others added 2 commits May 8, 2026 11:41
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants